﻿@namespace MudBlazor.UnitTests.TestComponents

<MudDataGrid Items="@_items" Filterable="true">
    <Header>
        <tr>
            <HeaderCell T="Model">test</HeaderCell>
        </tr>
        
    </Header>
    <Columns>
        <Column T="Model" Field="@nameof(Model.Name)">
            <HeaderTemplate>
                <MudIcon Icon="@Icons.Filled.Headphones"></MudIcon>
                <span>Name</span>
            </HeaderTemplate>
        </Column>
        <Column T="Model" Field="@nameof(Model.Age)" />
        <Column T="Model" Field="@nameof(Model.Status)" />
    </Columns>
</MudDataGrid>

@code {
    private IEnumerable<Model> _items = new List<Model>()
    {
        new Model("Sam", 56, Severity.Normal), 
        new Model("Alicia", 54, Severity.Info), 
        new Model("Ira", 27, Severity.Success),
        new Model("John", 32, Severity.Warning)
    };

    public record Model (string Name, int Age, Severity Status);
}
